> ## Documentation Index
> Fetch the complete documentation index at: https://sequence-0fb8d9e6-api_docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Boostrap your Ecosystem Wallet Game

> Using the provided boilerplates to quickly get your integration up and running.

Sequence's Unity SDK includes a range of features to help you bootstrap your game.
Import our Boilerplates from the `Demo` samples in the Package Manager UI.
Create them using the `BoilerplateFactory` as shown below. Feel free to adjust the UI and logic inside the samples to fit your needs.

Ensure that your codebase has access to the `Sequence.Boilerplates.asmdef` assembly.

Checkout the `BoilerplateController.cs` for more integration examples.

## Ecosystem Wallet

### Login Window

Create the `EcosystemWalletLoginWindow` prefab to authenticate users as a Guest, with Email OTP, Google- or Apple Sign In.

[Checkout the Ecosystem Wallet Setup section](/sdk/unity/wallets/ecosystem-wallet/setup) for more details on how to configure
your project to connect to an Ecosytem of your choice.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/X7-XubmuG4FfjQJg/images/unity/ecosystem_wallet_login.png?fit=max&auto=format&n=X7-XubmuG4FfjQJg&q=85&s=b082186fc237d581e2cee2e3a376219b" width="1290" height="672" data-path="images/unity/ecosystem_wallet_login.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenEcosystemWalletLoginWindow(parent);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.
</Accordion>

### Profile

Create the `EcosystemWalletProfile` prefab to sign messages, add more sessions and view wallet details.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/X7-XubmuG4FfjQJg/images/unity/ecosystem_wallet_profile.png?fit=max&auto=format&n=X7-XubmuG4FfjQJg&q=85&s=56ccd690c39754b46d9493d981868b20" width="1290" height="672" data-path="images/unity/ecosystem_wallet_profile.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenEcosystemWalletProfile(parent, wallet);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (EcosystemWallet.IWallet)**

  The Ecosystem Wallet instance.
</Accordion>

### Transactions

Create the `EcosystemWalletTransactions` prefab to test sending transactions with pre-configured permissions.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/X7-XubmuG4FfjQJg/images/unity/ecosystem_wallet_transactions.png?fit=max&auto=format&n=X7-XubmuG4FfjQJg&q=85&s=e93e8aaf3092bf20fe4e7a24ca38585b" width="1290" height="672" data-path="images/unity/ecosystem_wallet_transactions.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenEcosystemWalletTransactions(parent, wallet);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (EcosystemWallet.IWallet)**

  The Ecosystem Wallet instance.
</Accordion>

## Embedded Wallet

<Info>
  Embedded Wallet Boilerplates use Arbitrum Sepolia by default. Do the following to switch them to your preferred
  chain `EmbeddedWalletAdapter.GetInstance().Chain = Chain.TestnetPolygonAmoy;`
</Info>

### Login Window

Create the `EmbeddedWalletLoginWindow` prefab to authenticate users as a Guest, with Email OTP, Google- or Apple Sign In.

[Checkout the Authentication section](/sdk/unity/wallets/embedded-wallet/onboard/authentication/intro) for more details on how to configure
your project for each login option.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_login.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=d418b0f515191114c6c94eecd1795d40" width="1144" height="500" data-path="images/unity/unity_boilerplate_login.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenEmbeddedWalletLoginWindow(parent);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.
</Accordion>

### In-Game Shop

Accelerate your game growth by selling items directly to your players. Create the `SequencePlayerProfile` prefab to
show an In-Game Shop that utilizes game items from a ERC1155 contract, which users purchase using any custom or
existing ERC20 currency.

[Primary Sales Contract](/solutions/builder/contracts/deploy-primary-sales-contract/): Learn how to set up and deploy contracts for launching a primary sale.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_shop.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=5c0de8b1709550367c33a30b93544208" width="1144" height="500" data-path="images/unity/unity_boilerplate_shop.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenSequenceInGameShop(parent, wallet, chain, collectionAddress, saleContractAddress, itemsForSale, onClose);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (IWallet)**

  The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.

  **chain (Chain)**

  The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.

  **collectionAddress (string)**

  ERC1155 contract address. Deploy your own contract on Builder first.

  **saleContractAddress (string)**

  ERC1155 Sale contract address when you deploy your sale on Builder.

  **itemsForSale (int\[])**

  Array of token Ids which you wish to sell to your players.

  **onClose (Action)**

  Optional. Callback when the user closes this window.
</Accordion>

### Daily Rewards

Reward users with NFTs or Collectibles for playing your game for consecutive days. Deploy our server boilerplate
which performs the mint transaction whenever they claim their reward.

Make sure to deploy our [Daily Rewards Server Boilerplate](https://github.com/0xsequence-demos/daily-rewards-server-boilerplate)

<Frame>
  <img alt="img" src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_daily_rewards.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=7196012bfdaf01acb4ec83fa7db7b8a3" width="1144" height="500" data-path="images/unity/unity_boilerplate_daily_rewards.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenSequenceDailyRewards(parent, wallet, chain, apiUrl, onClose);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (IWallet)**

  The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.

  **chain (Chain)**

  The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.

  **apiUrl (string)**

  The API url you receive after deploying the required server boilerplate.

  **onClose (Action)**

  Optional. Callback when the user closes this window.
</Accordion>

### Player Profile

Create the `SequencePlayerProfile` prefab to manage your current profile. This includes functionalities such as Sign Out,
linking external wallets, sending native tokens, and QR code to receive funds.

<Frame>
  <img alt="img" src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_profile.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=a13bc5b869a2c754efd848cc9ef75ead" width="1144" height="500" data-path="images/unity/unity_boilerplate_profile.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenSequencePlayerProfile(parent, wallet, chain, onClose);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (IWallet)**

  The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.

  **chain (Chain)**

  The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.

  **onClose (Action)**

  Optional. Callback when the user closes this window.
</Accordion>

### Inventory

Create the `SequenceInventory` prefab to show all items owned by a user from any ERC1155 or ERC721 contract.

<Frame>
  <img alt="img" src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_inventory.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=f414ccf7d4a7e5c72a5b83a9690c0734" width="1144" height="500" data-path="images/unity/unity_boilerplate_inventory.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenSequenceInventory(parent, wallet, chain, collections, onClose);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (IWallet)**

  The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.

  **chain (Chain)**

  The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.

  **collectionAddress (string\[])**

  Array of RC1155 or ERC721 contract addresses. Deploy your own contract on Builder first.

  **onClose (Action)**

  Optional. Callback when the user closes this window.
</Accordion>

### Sign Messages

Create the `SequenceSignMessage` prefab to show a modal that lets you sign a specified text.

<Frame>
  <img alt="img" src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/CmKz04BVDGuy1x-Z/images/unity/unity_boilerplate_signmessage.png?fit=max&auto=format&n=CmKz04BVDGuy1x-Z&q=85&s=905e80185f1ae7a72b6ed0b33624accc" width="1144" height="500" data-path="images/unity/unity_boilerplate_signmessage.png" />
</Frame>

```csharp theme={null}
BoilerplateFactory.OpenSequenceSignMessage(parent, wallet, chain, onClose);
```

<Accordion title="Parameters">
  **parent (Transform)**

  Transform inside of a Canvas object.

  **wallet (IWallet)**

  The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.

  **chain (Chain)**

  The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.

  **onClose (Action)**

  Optional. Callback when the user closes this window.
</Accordion>
